using Nop.Core.Domain.XJ;

namespace Nop.Data.Mapping.XJ
{
	public partial class XJInspectionPlanMap : NopEntityTypeConfiguration<XJInspectionPlan>
	{
		public XJInspectionPlanMap()
		{
			this.ToTable("XJInspectionPlan");
			this.HasKey(c => c.Id);

			this.Property(p => p.PNo).HasMaxLength(32);
			this.Property(p => p.Name).HasMaxLength(50);

			this.HasMany(c => c.Categorys)
				.WithMany()
				.Map(m => m.ToTable("XJInspectionPlan_XJEquipmentCategory_Mapping"));

			this.HasMany(c => c.Places)
				.WithMany()
				.Map(m => m.ToTable("XJInspectionPlan_XJPlace_Mapping"));
		}
	}
}

